package com.springboot.demo.config;

import com.fasterxml.jackson.core.JsonParser;
import com.fasterxml.jackson.databind.DeserializationContext;
import com.fasterxml.jackson.databind.deser.std.StdDeserializer;

import java.io.IOException;

/**
 * @author wubc683
 * @desc
 * @date 2021-10-16 15:07
 */
//public class StringWithoutSpaceDeserializer extends StdDeserializer<String> {
//
//    private static final long serialVersionUID = -6972065572263950443L;
//
//    public StringWithoutSpaceDeserializer(Class<String> vc) {
//        super(vc);
//    }
//
//    @Override
//    public String deserialize(JsonParser p, DeserializationContext ctxt) throws IOException {
//        return p.getText() != null ? p.getText().trim() : null;
//    }
//}